// components/RecursiveStockDisplay.tsx
import React, { useEffect, useState } from 'react';
import { Row, Col, Typography, Divider, Tabs } from 'antd';
import services from '@/services/demo';
 
import styles from './index.css';

const { TabPane } = Tabs;

 

const { Title, Text } = Typography;
const itemStyle = {
  width: '75px', // 设置固定宽度
  // height: '50px', // 设置固定高度
  // border: '1px solid black',
  margin: '1px 0px' // 设置间距
};

const RecursiveStockDisplay: React.FC = () => {

  const [level, setLevel] = useState(1);
  const [dataSource, setDataSource] = useState<any[]>([]);

  const getTotalAssets = async () => {
    //const hide = message.loading('正在加载', 0); // 优化用户反馈，0表示不自动关闭
    //try {
 
    // console.log("success:", response?.code)
    // if (response?.code === 1) {
    //   console.log("data:" + JSON.stringify(response?.data))
    //   setDataSource(response?.data);
    //   //message.success('数据加载成功');
    // } else {
    //   // 如果API调用成功但success标志为false，也给出提示
    //   //message.error('加载失败，请检查数据源！');
    // }
    // } catch (e) {
    //   message.error('加载失败，请重试！' + e);
    // } finally {
    //   //hide(); // 无论请求成功还是失败，都应关闭加载提示
    // }
  };

  useEffect(() => {
    getTotalAssets();
    // 如果getPriceInfoList不依赖于外部状态或props，这里不需要添加依赖
  }, []); // 确保effect仅在组件挂载时执行

  const onChange = (key: string) => {
    console.log(key);
  };

  return (
    <>
      <Tabs defaultActiveKey="1" onChange={onChange}>
        <TabPane tab="Tab 1" key="1">
        
        </TabPane>
        <TabPane tab="Tab 2" key="2" disabled>
          Content of Tab Pane 2
        </TabPane>
        <TabPane tab="Tab 3" key="3">
          Content of Tab Pane 3
        </TabPane>
      </Tabs>
    </>
  );
};

export default RecursiveStockDisplay;